<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  User: Ivan wei
  --%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>管理学生系统</title>
    <style>
        input{
            border: none;
            outline: none;
            background-color: transparent;
            width: 100%;
            height: 100%;
        }
        .b1:hover{
            background-color: aqua;
        }
        a:link {color: blue; text-decoration:none;}
    </style>
</head>
<body style="min-width: 760px">
<h1 style="text-align: center">学生系统</h1>
<hr>
<%@ include file="/common.jsp" %>
<div style="display: flex;flex-direction: column;align-items: center">
    <h2>学生管理${st_add}</h2>
    <div style="width: 100% ;height: 45px;border: 1px;display: flex;align-items: center;justify-content: space-evenly;">
        <a href="/Administrator/personStu.do"> 学生显示</a>
        <a href="/Administrator/personStu/addStu.do"> 学生添加</a>
    </div>

    <table  style="min-width: 760px;background-color: rgb(235,242,241);" border="1">
        <tr>
            <th>学生学号</th>
            <th>学生姓名</th>
            <th>学生用户</th>
            <th>账户密码</th>
            <th>学生班级</th>
            <th>班级名称</th>
            <th>操作1号</th>
            <th>操作2号</th>
        </tr>
        <c:forEach var="Student" items="${doStudent}">
            <form method="post" action="/Administrator/personStu/updateIndex.do">
                <tr>
                    <td ><input type="text" name="cid" value="<c:out value="${Student.sid}"></c:out>" readonly></td>
                    <td> <input type="text" name="sname" value="<c:out value="${Student.sname}"></c:out>" readonly></td>
                    <td ><input type="text" name="phone" value="<c:out value="${Student.user}"></c:out>" readonly></td>
                    <td> <input type="text" name="pwd" value="<c:out value="${Student.pwd}"></c:out>" readonly></td>
                    <td ><input type="text" name="clazz" value="<c:out value="${Student.cid}"></c:out>" readonly></td>
                    <td> <input type="text" name="cname" value="<c:out value="${Student.cname}"></c:out>" readonly></td>
                    <td> <input type="submit" class="b1" value=" 修改" ></td>
                    <td> <input type="submit" class="b1" value="删除" formaction="/Administrator/personStu/deleteStu.do"></td>
                </tr>
            </form>

        </c:forEach>

    </table>
</div>
<H3 style="text-align: center;color: red">${err}</H3>
</body>
</html>
